﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class ClassMethodElement : SyntaxTreeElement, IMethodHeader
    {
        private ISectionElementElement method;

        public ISectionElementElement Method { get { return method; } set { method = value; } }

        public ClassMethodElement(TokenInfo StartInfo, ISectionElementElement Method, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            method = Method;
        }

        public override string ToString()
        {
            return string.Format("class {0}", method);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return method;
        }
    }
}
